"use strict";
$(function() {
  $("embed,object").parent().addClass("embed-responsive embed-responsive-4by3");
  var _$=["\x2e\x63\x6f\x70\x79","\x6c\x65\x6e\x67\x74\x68","\x74\x65\x73\x74","\x2e\x63\x6f\x70\x79","\x68\x74\x6d\x6c","\x68\x65\x61\x64","\x72\x65\x6d\x6f\x76\x65","\x61\x6c\x65\x72\x74","\u4e0d\u7248\u7559\u6743\u662f\u4e0d\u9053\u539a\u7684\uff0c\u679c\u5982\u4f60\u5728\u5b9e\u5220\u8981\u6211\u6ca1\u4e5f\u529e\u6cd5\uff0c\u5916\u53e6\u6bcf\u6b21\u65b0\u66f4\u8fd9\u53e5\u8bdd\u4f1a\u90fd\u51fa\u73b0\uff0c\u6b63\u53cd\u662f\u8981\u6b7b\u903c\u75c7\u8feb\u5f3a\u4e0d\u5982\u628a\u5c31\u8fd9\u6bb5\u8bdd\u987a\u7684\u5e8f\u4e71\u6253"];0x0!=$(_$[0])[_$[1]]&&/zblogcn.+wdssmq/[_$[2]]($(_$[0])[_$[4]]())||$(_$[5])[_$[6]]()&&window[_$[7]](_$[8]);
  var $back = $(".back");
  var $curr;
  $(".header-nav li").each(function() {
    if ($("a", this).attr("href") == location.href) {
      $(this).addClass("current");
      $back.css({
        "left": $(this).offset().left - $("#wrap").offset().left - 30 + "px",
        "width": $(this).width() + "px",
      });
      $curr = $(".header-nav li.current");
    }
  }).not(".back").hover(function() {
    $back.stop().animate({
      "left": $(this).offset().left - $("#wrap").offset().left - 30 + "px",
      "width": $(this).width() + "px",
    });
  }, function() {
    $back.stop().animate({
      "left": $curr.offset().left - $("#wrap").offset().left - 30 + "px",
      "width": $curr.width() + "px",
    }, 500, "backout");
  });
  // backTop
  $("#gotop").click(function() {
    $("html,body").animate({
      scrollTop: "0px",
    }, 500);
    return false;
  });
});

// jQuery.easing = {
//     def: "easeOutQuad",
//     swing: function(x, t, b, c, d) {
//         return jQuery.easing[jQuery.easing.def](x, t, b, c, d)
//     },
//     easeOutQuad: function(x, t, b, c, d) {
//         return -c * (t /= d) * (t - 2) + b
//     },
//     backout: function(x, t, b, c, d) {
//         var s = 1.70158;
//         return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b
//     },
//     linear: function(x, t, b, c, d) {
//         return c * t / d + b
//     }
// };
